<?php 
$CI =& get_instance();
$CI->load->database();
$CI->load->library("front/header_lib");
$query_pages = $CI->db->get_where('bur_staticpages',array('staticpage_link'=>'current_specilals'));
foreach($query_pages->result() as $row_vals)
{
    $title = $row_vals->staticpage_title;
	$metakey_page = $row_vals->staticpage_metakey;
    $metadesc_page = $row_vals->staticpage_metadesc;  
}
$CI->header_lib->display_header_element(array("script"=>array("jquery-1.4.2"),"page_title"=>$title." - subscriber","metakey_page"=>$metakey_page,"metadesc_page"=>$metadesc_page));
$CI->header_lib->display_header();


?>
<!--body content starts-->

<div id="container_wrapper">
	<div id="body_container">
    	<div class="left_part">
        	<!--<a href="<?php echo site_url();?>"><img class="sub_smallLogo" src="<?php echo site_url()?>images/small_log.jpg" height="201" width="262" alt="Mykprisguide US" /></a>
            <div class="div04">-->
            <p class="normal_text">Subscribe or unsubscribe from our <br /> specials newsletter. Be the first to <br /> know of our latest special deals.
           <!-- </div>-->
            <div class="height10_10"></div>
             <div class="request_quote">
            <ul style="list-style:none;">
            	<form method="post" action="<?php echo site_url()?>current-special/subscriber" name="subscribers" id="subscriber">
                <li style="margin-bottom:7px;">
                <select name="status" id="status" style="width:178px; font-size:17px; color:#0C1217;">
                    <option value="1">Yes! Subsccribe Me</option>
                    <option value="2">Unsubscribe Me</option>
                </select>
                
                </li>
                <li>
                <input style="width:170px; padding:2px 4px; font-size:17px; color:#0C1217;" type="text" name="emailId" id="emailId" value="your e-mail address" onclick="this.select()" />
                <input class="blue_btn" type="submit" name="submit" id="submit" value="Submit" /> 
                </li>
                </form>
            </ul>
            </div>
        </div>
    	
        <div class="right_part">
        	<div class="div05">
            <h1 class="heading01">current specials</h1>
            <p class="redTxt">Specials on offer at the moment</p>
             <?php if($query == 'error'){?>
            <?php /*?><div class="normal_text">
            <?php echo form_error('emailId');?>
            </div><?php */?>
            <div class="double_line1">
            		<img height="42" width="40" alt="" src="<?php echo site_url();?>images/cancel_icon.png" class="tick">		
                    <div class="tick_div">
                		<p class="yellow_txt">Please enter a valid e-mail address</p>
                	</div>
                	<div class="clear"></div>
            		</div>
                    <div class="height10_10"></div>
                    <p class="normal_text4"> Please try subscribing to the newsletter with a valid e-mail address using the form on the left.
Or <a class="blue_link" href="<?php echo site_url();?>">click here</a> to return to the home page.</p>
            <?php }
                elseif($query == 1)
                {
                     if($status == 1)
                     {
                ?>
                	<div class="double_line1">
            		<img height="42" width="53" alt="" src="<?php echo site_url();?>images/tickMark.png" class="tick">		
                    <div class="tick_div">
                		<p class="redTxt3">Success - you have been added.</p>
                	</div>
                	<div class="clear"></div>
            		</div>
                    <div class="height10_10"></div>
                    <p class="normal_text4">You have joined the mailing list succesfully. <br />Thanks for joining our newsletter and please note that you may unsubscribe at any time.</p>
                <?php
                     } 
                     else
                     {
                ?>
                         
                    <div class="double_line1">
            		<img height="42" width="53" alt="" src="<?php echo site_url();?>images/tickMark.png" class="tick">		
                    <div class="tick_div">
                		<p class="redTxt3">Success - you unsubscribed.</p>
                	</div>
                	<div class="clear"></div>
            		</div>
                    <div class="height10_10"></div>
                    <p class="normal_text4">You have unsubscribed successfully from our newsletter. <b>Sorry to see you go!</b></p>
                <?php  
                        
                     }  
                ?>
            
            <?php }
                 else
                 { 
                   if($status == 1)
                   {
					   
            ?>
                    <div class="double_line1">
            		<img height="42" width="40" alt="" src="<?php echo site_url();?>images/cancel_icon.png" class="tick">		
                    <div class="tick_div">
                		<p class="yellow_txt">That e-mail already exists in the database.</p>
                	</div>
                	<div class="clear"></div>
            		</div>
                    <div class="height10_10"></div>
                    <p class="normal_text4"> Please try subscribing to the newsletter with another<br /> e-mail address using the form on the left.<br />Or <a class="blue_link" href="<?php echo site_url();?>">click here</a> to return to the home page.!</b></p>
                       
                       
                    <?php }else{?> 
                    
                    <div class="double_line1">
            		<img height="42" width="40" alt="" src="<?php echo site_url();?>images/cancel_icon.png" class="tick">		
                    <div class="tick_div">
                		<p class="yellow_txt">that e-mail does not exist in the database.</p>
                	</div>
                	<div class="clear"></div>
            		</div>
                    <div class="height10_10"></div>
                    <p class="normal_text4"> Please try subscribing to the newsletter with another e-mail address using the form on the left. Or <a class="blue_link" href="<?php echo site_url();?>">click here</a> to return to the home page.!</b></p>  
                            
                   <?php }?>
            <?php }?>
            </div>
        </div>
        <div class="clear"></div>    
    </div>
</div>

<!--body content ends-->
<?php
$CI->load->library("front/footer_lib");
$CI->footer_lib->display_footer();
$CI->footer_lib->display_footer_element();

?>